# Linux version

.SUFFIXES:
.SUFFIXES: .cpp .obj .o .c

CPP = g++ -m64

INC_DIR = -I../../inc/asio_1.18.0 \
-I../../inc/tcpnet \
-I./

LIB_DIR = -L../../lib

CPPDEFS = -O2 -Wall -fPIC -Wno-deprecated -std=c++11

LIBS = -ldl -lpthread

.cpp.o:
	$(CPP) -c $(CPPDEFS) $(INC_DIR) $< -o $@

.c.o:
	$(CPP) -c $(CPPDEFS) $(INC_DIR) $< -o $@
	
OBJS_LIB = \
channel.o \
channel_manager.o \
tcp_api.o \
log.o

all : libtcpnet.so 

libtcpnet.so : $(OBJS_LIB)
	$(CPP) -shared $(OBJS_LIB) -o $@ $(CPPDEFS) 
	mv $@ ../../lib
	
clean:
	rm *.o

